from flask_script import Manager
from info import create_app
from flask_migrate import MigrateCommand
from flask_cors import CORS

# 创建web应用
app = create_app("dev")
app.config['JSON_AS_ASCII'] = False
app.config['JSON_SORT_KEYS'] = False
CORS(app)

# 创建管理器
mgr = Manager(app)

# 生成迁移命令
mgr.add_command("mc", MigrateCommand)

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True, threaded=True)
